package com.service.impl;

import com.dao.UserInfoDao;
import com.dao.impl.UserInfoDaoImpl;
import com.pojo.OrderInfo;
import com.pojo.UserInfo;
import com.service.UserInfoService;

import java.awt.print.Book;
import java.util.List;

public class UserInfoServiceImpl implements UserInfoService {

    private UserInfoDao userInfoDao = new UserInfoDaoImpl();

    @Override
    public UserInfo login(UserInfo userInfo) {
        return userInfoDao.queryUserByUsernameAndPassword(userInfo.getUserName(), userInfo.getPassword());
    }

    @Override
    public OrderInfo queryOrderInfoById(Integer id) {
        return userInfoDao.queryOrderInfoById(id);
    }

    @Override
    public void deleteOrderInfoById(Integer id) {
        userInfoDao.deleteOrderInfoById(id);
    }

}
